#include <Arduino.h>

#ifndef COMMON_H
#define COMMON_H

// 判断从指定时间的开始，有没有到达diff毫秒
bool timePassed(unsigned long &t, int32_t diff);

void printHex(std::string data);

void printHex(uint8_t *data, int len);

void printBin(void *data, int len);

int binToInt(void *data, int size);

void bincpy(void *tar, void *src, int offsetSrc, int len, int padding, int srcLen);

#endif